package com.ydc.ln.tutorial.algorithm.book.itjp;

/**
 * 
 * @author ydc
 * @date 下午11:53:51 2013-6-14
 */
public class MainTest {
    public static void main(String[] args) {
        new MainTest().test01("", "abc");
    }

    void test01(String str1, String str2) {
        int size = str2.length();
        if (size == 0) {
            System.out.println(str1);
        }
        for (int i = 0; i < size; i++) {
            test01(str1 + str2.charAt(i),
                    str2.substring(0, i) + str2.substring(i + 1, size));
        }
    }
}
